package fitness

import (
	fitnessService "fitness/internal/service/fitness"
	"fitness/pkg/middleware"
	"github.com/gin-gonic/gin"
)

type UserController struct {
	UserService *fitnessService.UserService
	Rbac        *middleware.Rbac
}

func NewUserController(UserService *fitnessService.UserService, Rbac *middleware.Rbac) *UserController {
	return &UserController{
		UserService: UserService,
		Rbac:        Rbac,
	}
}

func (api *UserController) InitApiRouter(engine *gin.Engine) {
	user := engine.Group("/fitness")
	{
		//获取用户分页
		user.GET("/getUserPage", middleware.Jwt, api.UserService.GetUserPage)
		////新增
		//detail.POST("/insert", middleware.Jwt, api.DetailService.Insert)
		////修改
		//detail.POST("/update", middleware.Jwt, api.DetailService.Update)
		////删除
		//detail.DELETE("/:id", middleware.Jwt, api.DetailService.Delete)
		////获取设置课程的数量
		//detail.GET("courses/month", middleware.Jwt, api.DetailService.Courses)
	}
}
